home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / program / swagg_m.zip / KEYBOARD.SWG / 0082_LiteShow (LED).pas < prev    next >
Pascal/Delphi Source File  |  1994-08-24  |  708b  |  36 lines

  1. {
  2.  ER> Anyway, Does anyone knows who to make the num/caps/scroll
  3.  ER> leds on the keyboard 'flicker' or just light up? (You could
  4.  ER> create pretty cool effects like a 'walking light' on ones
  5.  ER> keyboard..:) I checked the SWAGfiles but was not able to
  6.  ER> find anything there..
  7. }
  8. Program LiteShow;
  9. Uses Crt;
  10.  
  11. Var
  12.    i : Byte;
  13.  
  14. Procedure SetLED(LED: Byte); Assembler;
  15. ASM
  16.      MOV  AL, $ED
  17.      OUT  $60, AL
  18.      MOV  CX, $200
  19. @@1:
  20.      LOOP @@1
  21.      MOV  AL, LED
  22.      OUT  $60, AL
  23. End;
  24.  
  25. Begin
  26.    i := 1;
  27.    While not KeyPressed do
  28.    Begin
  29.       SetLED(i);
  30.       i := i SHL 1;
  31.       If i = 8 then i := 1;
  32.       Delay(200);
  33.    End;
  34.    While KeyPressed do ReadKey;
  35. End.
  36.